﻿using System;
using Comm100.Framework.Module;
using Comm100.Framework.Tenancy;
using Comm100.Framework.Web;
using Comm100.Framework.Extension;
using Bot.Application;
using Bot.Infrastructure;
using Microsoft.AspNetCore.Http;
using Bot.Domain;

namespace Bot.WebAPI
{
    [DependsOn(typeof(BotApplicationModule), typeof(BotInfrastructureModule))]
    public class WebAPIModule : AbstractModule
    {
        public override void Initialize()
        {
            this.Container.Register<IHttpContextAccessor, HttpContextAccessor>();
            //this.Container.Register<ITenancyResolver, TenancyResolver>(DependencyLifeStyle.Scoped);
            this.Container.Register<ITenancyResolver, BotTenantProvider>(DependencyLifeStyle.Scoped);
        }
    }
}